package cqrtplm.mapper;

import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.mapping.StatementType;
import org.springframework.stereotype.Repository;

@Repository
public interface MaterialCodeMapper {

    // 获取下一个编码
    String getNextCode(@Param("categoryCode") String categoryCode);

    // 方式1：使用CALL语法
    @Options(statementType = StatementType.CALLABLE)
    void releaseCode(@Param("fullCode") String fullCode);

}
